package cn.good.yan.config.pojo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;
import java.util.List;

/**
 * 自定义的 - 用户类
 *
 * @author shengren.yan
 * @create 2024/10/13
 */
@SuppressWarnings("all")
public class UserEntity implements UserDetails {

    private String username;
    private String password;
    private List<GrantedAuthority> authorities;  // 权限

    public UserEntity(String username, String password, List<GrantedAuthority> authorities) {
        this.username = username;
        this.password = password;
        this.authorities = authorities;
    }


    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public String getPassword() {
        return null;
    }

    @Override
    public String getUsername() {
        return null;
    }


    // 判断帐户是否过期
    @Override
    public boolean isAccountNonExpired() {
        return false;
    }

    // 判断帐户是否锁定
    @Override
    public boolean isAccountNonLocked() {
        return false;
    }

    // 凭据是否过期，就是登录时间到没到
    @Override
    public boolean isCredentialsNonExpired() {
        return false;
    }

    // 是否启动
    @Override
    public boolean isEnabled() {
        return false;
    }


}
